//---------------------------------------------------------------------------

#ifndef TMainFormH
#define TMainFormH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Dialogs.hpp>
#include <Menus.hpp>
#include <ComCtrls.hpp>

#include "TDataBase.h"
#include "TCode.h"
#include <ExtCtrls.hpp>

//---------------------------------------------------------------------------
class TMainForm : public TForm
{
__published:	// IDE-managed Components
	TMainMenu *MainMenu1;
	TMenuItem *File1;
	TMenuItem *Open1;
	TOpenDialog *OpenDialog1;
	TTreeView *TreeView1;
	TRichEdit *Code;
	TImage *Image1;
	void __fastcall Open1Click(TObject *Sender);
    void __fastcall TreeView1DblClick(TObject *Sender);
	void __fastcall CodeKeyUp(TObject *Sender, WORD &Key, TShiftState Shift);
private:	// User declarations
	TDataBase *DataBase;
	TTreeNode *MainNode;
public:		// User declarations
	__fastcall TMainForm(TComponent* Owner);
	__fastcall  ~TMainForm();
	void __fastcall CreateTree( TCode *tCode );
	TTreeNode *__fastcall FindChild( TTreeNode *pNode, int nNode );

};
//---------------------------------------------------------------------------
extern PACKAGE TMainForm *MainForm;
//---------------------------------------------------------------------------
#endif
